<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>webpack打包TypeScript | 清风随笔</title>
    <meta name="generator" content="VuePress 1.7.1">
    <link rel="icon" href="/docs/assets/img/favicon.ico">
    <meta name="description" content="清风随笔">
    <meta rel="author" content="清风随笔">
    <meta rel="keywords" content="前端笔记，清风随笔">
    <link rel="preload" href="/docs/assets/css/0.styles.444b3866.css" as="style"><link rel="preload" href="/docs/assets/js/app.9a1ea3d7.js" as="script"><link rel="preload" href="/docs/assets/js/2.b157a060.js" as="script"><link rel="preload" href="/docs/assets/js/11.213666d1.js" as="script"><link rel="prefetch" href="/docs/assets/js/10.22d7ac9e.js"><link rel="prefetch" href="/docs/assets/js/12.c2bc9913.js"><link rel="prefetch" href="/docs/assets/js/13.b6f5507a.js"><link rel="prefetch" href="/docs/assets/js/14.691b0567.js"><link rel="prefetch" href="/docs/assets/js/15.6390a7cc.js"><link rel="prefetch" href="/docs/assets/js/16.87305a0e.js"><link rel="prefetch" href="/docs/assets/js/17.72be41e6.js"><link rel="prefetch" href="/docs/assets/js/18.abea1bb2.js"><link rel="prefetch" href="/docs/assets/js/19.6d43f402.js"><link rel="prefetch" href="/docs/assets/js/20.5a22e6b1.js"><link rel="prefetch" href="/docs/assets/js/21.3ed6dff5.js"><link rel="prefetch" href="/docs/assets/js/22.28f18616.js"><link rel="prefetch" href="/docs/assets/js/23.ebe08f15.js"><link rel="prefetch" href="/docs/assets/js/24.1ec03719.js"><link rel="prefetch" href="/docs/assets/js/3.4bb508f8.js"><link rel="prefetch" href="/docs/assets/js/4.19f0a32d.js"><link rel="prefetch" href="/docs/assets/js/5.f96a32c3.js"><link rel="prefetch" href="/docs/assets/js/6.b5f8c138.js"><link rel="prefetch" href="/docs/assets/js/7.fde78f5d.js"><link rel="prefetch" href="/docs/assets/js/8.9feb6e45.js"><link rel="prefetch" href="/docs/assets/js/9.1484fc35.js">
    <link rel="stylesheet" href="/docs/assets/css/0.styles.444b3866.css">
  </head>
  <body class="theme-mode-light">
    <div id="app" data-server-rendered="true"><div class="theme-container sidebar-open have-rightmenu"><header class="navbar blur"><div title="目录" class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/docs/" class="home-link router-link-active"><img src="/docs/assets/img/logo.png" alt="清风随笔" class="logo"> <span class="site-name can-hide">清风随笔</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/docs/" class="nav-link">主页</a></div><div class="nav-item"><a href="/docs/pages/c3cd55/" class="nav-link">Vue</a></div><div class="nav-item"><a href="/docs/pages/2b5650/" class="nav-link">JavaScript</a></div><div class="nav-item"><a href="/docs/pages/11e8fa/" class="nav-link">TypeScript</a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar" style="display:none;"><!----> <nav class="nav-links"><div class="nav-item"><a href="/docs/" class="nav-link">主页</a></div><div class="nav-item"><a href="/docs/pages/c3cd55/" class="nav-link">Vue</a></div><div class="nav-item"><a href="/docs/pages/2b5650/" class="nav-link">JavaScript</a></div><div class="nav-item"><a href="/docs/pages/11e8fa/" class="nav-link">TypeScript</a></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>TypeScript基础</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/docs/pages/f09cf0/" class="sidebar-link">TypeScript介绍</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/docs/pages/f09cf0/#介绍" class="sidebar-link">介绍</a></li><li class="sidebar-sub-header"><a href="/docs/pages/f09cf0/#语言特性" class="sidebar-link">语言特性</a></li><li class="sidebar-sub-header"><a href="/docs/pages/f09cf0/#javascript-与-typescript-的区别" class="sidebar-link">JavaScript 与 TypeScript 的区别</a></li></ul></li><li><a href="/docs/pages/d2aa68/" class="sidebar-link">开发环境搭建</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/docs/pages/d2aa68/#typescript-开发环境搭建" class="sidebar-link">TypeScript 开发环境搭建</a></li></ul></li><li><a href="/docs/pages/12e874/" class="sidebar-link">类型声明</a><ul class="sidebar-sub-headers"></ul></li><li><a href="/docs/pages/565233/" class="sidebar-link">编译选项</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/docs/pages/565233/#自动编译文件" class="sidebar-link">自动编译文件</a></li><li class="sidebar-sub-header"><a href="/docs/pages/565233/#自动编译整个项目" class="sidebar-link">自动编译整个项目</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/docs/pages/565233/#配置选项" class="sidebar-link">配置选项</a></li></ul></li></ul></li><li><a href="/docs/pages/978d74/" aria-current="page" class="active sidebar-link">webpack打包TypeScript</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/docs/pages/978d74/#webpack" class="sidebar-link">webpack</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/docs/pages/978d74/#步骤" class="sidebar-link">步骤</a></li></ul></li><li class="sidebar-sub-header"><a href="/docs/pages/978d74/#babel" class="sidebar-link">Babel</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/docs/pages/978d74/#步骤-2" class="sidebar-link">步骤</a></li></ul></li></ul></li></ul></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>TypeScript面向对象</span> <span class="arrow right"></span></p> <!----></section></li></ul> </aside> <div><main class="page"><div class="theme-vdoing-wrapper "><div class="articleInfo-wrap" data-v-33863c7e><div class="articleInfo" data-v-33863c7e><ul class="breadcrumbs" data-v-33863c7e><li data-v-33863c7e><a href="/docs/" title="首页" class="iconfont icon-home router-link-active" data-v-33863c7e></a></li> <li data-v-33863c7e><a href="/docs/categories/?category=TypeScript" title="分类" data-v-33863c7e>TypeScript</a></li> <li data-v-33863c7e><a href="/docs/categories/?category=TypeScript%E5%9F%BA%E7%A1%80" title="分类" data-v-33863c7e>TypeScript基础</a></li> <!----></ul> <div class="info" data-v-33863c7e><!----> <div title="创建时间" class="date iconfont icon-riqi" data-v-33863c7e><a href="javascript:;" data-v-33863c7e>2020-12-23</a></div> <!----></div></div></div> <!----> <div class="content-wrapper"><div class="right-menu-wrapper"><div class="right-menu-margin"><div class="right-menu-content"></div></div></div> <h1><img src="">
          webpack打包TypeScript
        </h1> <!----> <div class="theme-vdoing-content content__default"><h2 id="webpack"><a href="#webpack" class="header-anchor">#</a> webpack</h2> <p>通常情况下，实际开发中我们都需要使用构建工具对代码进行打包，TS 同样也可以结合构建工具一起使用，下边以 webpack 为例介绍一下如何结合构建工具使用 TS。</p> <h3 id="步骤"><a href="#步骤" class="header-anchor">#</a> 步骤</h3> <ol><li><p>初始化项目</p> <ul><li>进入项目根目录，执行命令 <code>npm init -y</code> <ul><li>主要作用：创建 package.json 文件</li></ul></li></ul></li> <li><p>下载构建工具</p> <p><code>npm i -D webpack webpack-cli webpack-dev-server typescript ts-loader clean-webpack-plugin</code></p> <ul><li>共安装了 7 个包
<ul><li>webpack
<ul><li>构建工具 webpack</li></ul></li> <li>webpack-cli
<ul><li>webpack 的命令行工具</li></ul></li> <li>webpack-dev-server
<ul><li>webpack 的开发服务器</li></ul></li> <li>typescript
<ul><li>ts 编译器</li></ul></li> <li>ts-loader
<ul><li>ts 加载器，用于在 webpack 中编译 ts 文件</li></ul></li> <li>html-webpack-plugin
<ul><li>webpack 中 html 插件，用来自动创建 html 文件</li></ul></li> <li>clean-webpack-plugin
<ul><li>webpack 中的清除插件，每次构建都会先清除目录</li></ul></li></ul></li></ul></li> <li><p>根目录下创建 webpack 的配置文件 webpack.config.js</p> <div class="language-javascript line-numbers-mode"><pre class="language-javascript"><code><span class="token keyword">const</span> path <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">&quot;path&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> HtmlWebpackPlugin <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">&quot;html-webpack-plugin&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> <span class="token punctuation">{</span> CleanWebpackPlugin <span class="token punctuation">}</span> <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">&quot;clean-webpack-plugin&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

module<span class="token punctuation">.</span>exports <span class="token operator">=</span> <span class="token punctuation">{</span>
  optimization<span class="token operator">:</span> <span class="token punctuation">{</span>
    minimize<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token comment">// 关闭代码压缩，可选</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>

  entry<span class="token operator">:</span> <span class="token string">&quot;./src/index.ts&quot;</span><span class="token punctuation">,</span>

  devtool<span class="token operator">:</span> <span class="token string">&quot;inline-source-map&quot;</span><span class="token punctuation">,</span>

  devServer<span class="token operator">:</span> <span class="token punctuation">{</span>
    contentBase<span class="token operator">:</span> <span class="token string">&quot;./dist&quot;</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>

  output<span class="token operator">:</span> <span class="token punctuation">{</span>
    path<span class="token operator">:</span> path<span class="token punctuation">.</span><span class="token function">resolve</span><span class="token punctuation">(</span>__dirname<span class="token punctuation">,</span> <span class="token string">&quot;dist&quot;</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
    filename<span class="token operator">:</span> <span class="token string">&quot;bundle.js&quot;</span><span class="token punctuation">,</span>
    environment<span class="token operator">:</span> <span class="token punctuation">{</span>
      arrowFunction<span class="token operator">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token comment">// 关闭webpack的箭头函数，可选</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>

  resolve<span class="token operator">:</span> <span class="token punctuation">{</span>
    extensions<span class="token operator">:</span> <span class="token punctuation">[</span><span class="token string">&quot;.ts&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;.js&quot;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>

  module<span class="token operator">:</span> <span class="token punctuation">{</span>
    rules<span class="token operator">:</span> <span class="token punctuation">[</span>
      <span class="token punctuation">{</span>
        test<span class="token operator">:</span> <span class="token regex"><span class="token regex-delimiter">/</span><span class="token regex-source language-regex">\.ts$</span><span class="token regex-delimiter">/</span></span><span class="token punctuation">,</span>
        use<span class="token operator">:</span> <span class="token punctuation">{</span>
          loader<span class="token operator">:</span> <span class="token string">&quot;ts-loader&quot;</span><span class="token punctuation">,</span>
        <span class="token punctuation">}</span><span class="token punctuation">,</span>
        exclude<span class="token operator">:</span> <span class="token regex"><span class="token regex-delimiter">/</span><span class="token regex-source language-regex">node_modules</span><span class="token regex-delimiter">/</span></span><span class="token punctuation">,</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token punctuation">]</span><span class="token punctuation">,</span>
  <span class="token punctuation">}</span><span class="token punctuation">,</span>

  plugins<span class="token operator">:</span> <span class="token punctuation">[</span>
    <span class="token keyword">new</span> <span class="token class-name">CleanWebpackPlugin</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
    <span class="token keyword">new</span> <span class="token class-name">HtmlWebpackPlugin</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
      title<span class="token operator">:</span> <span class="token string">&quot;TS测试&quot;</span><span class="token punctuation">,</span>
    <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
  <span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br></div></div></li> <li><p>根目录下创建 tsconfig.json，配置可以根据自己需要</p> <div class="language-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token property">&quot;compilerOptions&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
    <span class="token property">&quot;target&quot;</span><span class="token operator">:</span> <span class="token string">&quot;ES2015&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;module&quot;</span><span class="token operator">:</span> <span class="token string">&quot;ES2015&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;strict&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br></div></div></li> <li><p>修改 package.json 添加如下配置</p> <div class="language-json line-numbers-mode"><pre class="language-json"><code>  <span class="token punctuation">{</span>
    ...略...
    <span class="token property">&quot;scripts&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
      <span class="token property">&quot;test&quot;</span><span class="token operator">:</span> <span class="token string">&quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;</span><span class="token punctuation">,</span>
      <span class="token property">&quot;build&quot;</span><span class="token operator">:</span> <span class="token string">&quot;webpack&quot;</span><span class="token punctuation">,</span>
      <span class="token property">&quot;start&quot;</span><span class="token operator">:</span> <span class="token string">&quot;webpack serve --open chrome.exe&quot;</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    ...略...
  <span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br></div></div></li> <li><p>在 src 下创建 ts 文件，并在并命令行执行<code>npm run build</code>对代码进行编译，或者执行<code>npm start</code>来启动开发服务器</p></li></ol> <h2 id="babel"><a href="#babel" class="header-anchor">#</a> Babel</h2> <p>经过一系列的配置，使得 TS 和 webpack 已经结合到了一起，除了 webpack，开发中还经常需要结合 babel 来对代码进行转换以使其可以兼容到更多的浏览器，在上述步骤的基础上，通过以下步骤再将 babel 引入到项目中。</p> <h3 id="步骤-2"><a href="#步骤-2" class="header-anchor">#</a> 步骤</h3> <ol><li><p>安装依赖包</p> <p><code>npm i -D @babel/core @babel/preset-env babel-loader core-js</code></p> <ul><li>共安装了 4 个包，分别是：
<ul><li>@babel/core
<ul><li>babel 的核心工具</li></ul></li> <li>@babel/preset-env
<ul><li>babel 的预定义环境</li></ul></li> <li>@babel-loader
<ul><li>babel 在 webpack 中的加载器</li></ul></li> <li>core-js
<ul><li>core-js 用来使老版本的浏览器支持新版 ES 语法</li></ul></li></ul></li></ul></li> <li><p>修改 webpack.config.js 配置文件</p> <div class="language-javascript line-numbers-mode"><pre class="language-javascript"><code>  <span class="token operator">...</span>略<span class="token operator">...</span>
  module<span class="token operator">:</span> <span class="token punctuation">{</span>
      rules<span class="token operator">:</span> <span class="token punctuation">[</span>
          <span class="token punctuation">{</span>
              test<span class="token operator">:</span> <span class="token regex"><span class="token regex-delimiter">/</span><span class="token regex-source language-regex">\.ts$</span><span class="token regex-delimiter">/</span></span><span class="token punctuation">,</span>
              use<span class="token operator">:</span> <span class="token punctuation">[</span>
                  <span class="token punctuation">{</span>
                      loader<span class="token operator">:</span> <span class="token string">&quot;babel-loader&quot;</span><span class="token punctuation">,</span>
                      options<span class="token operator">:</span><span class="token punctuation">{</span>
                          presets<span class="token operator">:</span> <span class="token punctuation">[</span>
                              <span class="token punctuation">[</span>
                                  <span class="token string">&quot;@babel/preset-env&quot;</span><span class="token punctuation">,</span>
                                  <span class="token punctuation">{</span>
                                      <span class="token string">&quot;targets&quot;</span><span class="token operator">:</span><span class="token punctuation">{</span>
                                          <span class="token string">&quot;chrome&quot;</span><span class="token operator">:</span> <span class="token string">&quot;58&quot;</span><span class="token punctuation">,</span>
                                          <span class="token string">&quot;ie&quot;</span><span class="token operator">:</span> <span class="token string">&quot;11&quot;</span>
                                      <span class="token punctuation">}</span><span class="token punctuation">,</span>
                                      <span class="token string">&quot;corejs&quot;</span><span class="token operator">:</span><span class="token string">&quot;3&quot;</span><span class="token punctuation">,</span>
                                      <span class="token string">&quot;useBuiltIns&quot;</span><span class="token operator">:</span> <span class="token string">&quot;usage&quot;</span>
                                  <span class="token punctuation">}</span>
                              <span class="token punctuation">]</span>
                          <span class="token punctuation">]</span>
                      <span class="token punctuation">}</span>
                  <span class="token punctuation">}</span><span class="token punctuation">,</span>
                  <span class="token punctuation">{</span>
                      loader<span class="token operator">:</span> <span class="token string">&quot;ts-loader&quot;</span><span class="token punctuation">,</span>

                  <span class="token punctuation">}</span>
              <span class="token punctuation">]</span><span class="token punctuation">,</span>
              exclude<span class="token operator">:</span> <span class="token regex"><span class="token regex-delimiter">/</span><span class="token regex-source language-regex">node_modules</span><span class="token regex-delimiter">/</span></span>
          <span class="token punctuation">}</span>
      <span class="token punctuation">]</span>
  <span class="token punctuation">}</span>
  <span class="token operator">...</span>略<span class="token operator">...</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br></div></div><ul><li>如此一来，使用 ts 编译后的文件将会再次被 babel 处理，使得代码可以在大部分浏览器中直接使用，可以在配置选项的 targets 中指定要兼容的浏览器版本。</li></ul></li></ol></div></div> <!----> <div class="page-edit"><!----> <!----> <div class="last-updated"><span class="prefix">更新时间:</span> <span class="time">2020年12月23日星期三晚上11点26分</span></div></div> <div class="page-nav-wapper"><div class="page-nav-centre-wrap"><a href="/docs/pages/565233/" class="page-nav-centre page-nav-centre-prev"><div class="tooltip">编译选项</div></a> <a href="/docs/pages/a930b4/" class="page-nav-centre page-nav-centre-next"><div class="tooltip">前言</div></a></div> <div class="page-nav"><p class="inner"><span class="prev">
        ←
        <a href="/docs/pages/565233/" class="prev">编译选项</a></span> <span class="next"><a href="/docs/pages/a930b4/">前言</a>→
      </span></p></div></div></div> <div class="article-list"><div class="article-title"><a href="/docs/archives/" class="iconfont icon-bi">最近更新</a></div> <div class="article-wrapper"><dl><dd>01</dd> <dt><a href="/docs/pages/81236a/"><div>泛型 (Generic)</div></a> <span>12-23</span></dt></dl><dl><dd>02</dd> <dt><a href="/docs/pages/ff09e5/"><div>接口 (Interface)</div></a> <span>12-23</span></dt></dl><dl><dd>03</dd> <dt><a href="/docs/pages/a2f5e6/"><div>面向对象的特点</div></a> <span>12-23</span></dt></dl> <dl><dd></dd> <dt><a href="/docs/archives/" class="more">更多文章&gt;</a></dt></dl></div></div></main></div> <div class="footer"><!----> 
  Theme by
  <a href="https://github.com/xugaoyi/vuepress-theme-vdoing" target="_blank" title="本站主题">Vdoing</a> <!----></div> <div class="buttons"><div title="返回顶部" class="button blur go-to-top iconfont icon-fanhuidingbu" style="display:none;"></div> <div title="去评论" class="button blur go-to-comment iconfont icon-pinglun" style="display:none;"></div> <div title="主题模式" class="button blur theme-mode-but iconfont icon-zhuti"><ul class="select-box" style="display:none;"><li class="iconfont icon-zidong">跟随系统</li><li class="iconfont icon-rijianmoshi">浅色模式</li><li class="iconfont icon-yejianmoshi">深色模式</li><li class="iconfont icon-yuedu">阅读模式</li></ul></div></div> <!----> <!----> <!----></div><div class="global-ui"><!----></div></div>
    <script src="/docs/assets/js/app.9a1ea3d7.js" defer></script><script src="/docs/assets/js/2.b157a060.js" defer></script><script src="/docs/assets/js/11.213666d1.js" defer></script>
  </body>
</html>